Graylog-Project Version

Gentlemen,

Current graylog release is 3.0.1. I want to build it from source using gralog-cli tool.

However,if I use the graylog-cli tool with the manifests option set to use the version 3.0 manifest and successfully build, I get a jar file build to 3.0.2-snapshot.jar.

graylog-cli clone

 jake@jake-siem-dev:~/graylog-3.0.1$ ~/bin/graylog-project bootstrap -D -m manifests/3.0.json https://github.com/Graylog2/graylog-project.git
    git clone https://github.com/Graylog2/graylog-project.git graylog-project
      Cloning into 'graylog-project'...
    git checkout master
      Already on 'master'
      Your branch is up to date with 'origin/master'.
Active configuration:
(config.Config) {
 RepositoryRoot: (string) (len=24) "../graylog-project-repos",
 SelectedModules: (string) "",
 Checkout: (config.Checkout) {
  UpdateRepos: (bool) false,
  ShallowClone: (bool) false,
  ManifestFiles: ([]string) (len=1 cap=1) {
   (string) (len=18) "manifests/3.0.json"
  },
  Force: (bool) false,
  ModuleOverride: ([]string) {
  }
 },
 ApplyManifest: (config.ApplyManifest) {
  Execute: (bool) false,
  Force: (bool) false
 },
 Verbose: (bool) false,
 NoUpdateCheck: (bool) false,
 ForceHttpsRepos: (bool) true
}

Using manifests: [manifests/3.0.json]
Reading manifest file: /home/jake/graylog-3.0.1/graylog-project/manifests/3.0.json
Repository: https://github.com/Graylog2/graylog2-server.git
Cloning https://github.com/Graylog2/graylog2-server.git into /home/jake/graylog-3.0.1/graylog-project-repos/graylog2-server
    git clone https://github.com/Graylog2/graylog2-server.git /home/jake/graylog-3.0.1/graylog-project-repos/graylog2-server
      Cloning into '/home/jake/graylog-3.0.1/graylog-project-repos/graylog2-server'...
Checkout revision: 3.0
    git branch 3.0 origin/3.0
      Branch '3.0' set up to track remote branch '3.0' from 'origin'.
    git checkout 3.0
      Switched to branch '3.0'
      Your branch is up to date with 'origin/3.0'.
Repository: https://github.com/Graylog2/graylog-plugin-collector.git
Cloning https://github.com/Graylog2/graylog-plugin-collector.git into /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-collector
    git clone https://github.com/Graylog2/graylog-plugin-collector.git /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-collector
      Cloning into '/home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-collector'...
Checkout revision: 3.0
    git branch 3.0 origin/3.0
      Branch '3.0' set up to track remote branch '3.0' from 'origin'.
    git checkout 3.0
      Switched to branch '3.0'
      Your branch is up to date with 'origin/3.0'.
Repository: https://github.com/Graylog2/graylog-plugin-aws.git
Cloning https://github.com/Graylog2/graylog-plugin-aws.git into /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-aws
    git clone https://github.com/Graylog2/graylog-plugin-aws.git /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-aws
      Cloning into '/home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-aws'...
Checkout revision: 3.0
    git branch 3.0 origin/3.0
      Branch '3.0' set up to track remote branch '3.0' from 'origin'.
    git checkout 3.0
      Switched to branch '3.0'
      Your branch is up to date with 'origin/3.0'.
Repository: https://github.com/Graylog2/graylog-plugin-threatintel.git
Cloning https://github.com/Graylog2/graylog-plugin-threatintel.git into /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-threatintel
    git clone https://github.com/Graylog2/graylog-plugin-threatintel.git /home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-threatintel
      Cloning into '/home/jake/graylog-3.0.1/graylog-project-repos/graylog-plugin-threatintel'...
Checkout revision: 3.0
    git branch 3.0 origin/3.0
      Branch '3.0' set up to track remote branch '3.0' from 'origin'.
    git checkout 3.0
      Switched to branch '3.0'
      Your branch is up to date with 'origin/3.0'.
Generating pom.xml file from template pom.xml.tmpl
Generating runner/pom.xml file from template runner/pom.xml.tmpl
Generating src/main/assembly/server-tarball.xml file from template src/main/assembly/server-tarball.xml.tmpl
Writing manifest state to .graylog-project-manifest-state
Active configuration:
(config.Config) {
 RepositoryRoot: (string) (len=24) "../graylog-project-repos",
 SelectedModules: (string) "",
 Checkout: (config.Checkout) {
  UpdateRepos: (bool) false,
  ShallowClone: (bool) false,
  ManifestFiles: ([]string) <nil>,
  Force: (bool) false,
  ModuleOverride: ([]string) {
  }
 },
 ApplyManifest: (config.ApplyManifest) {
  Execute: (bool) false,
  Force: (bool) false
 },
 Verbose: (bool) false,
 NoUpdateCheck: (bool) false,
 ForceHttpsRepos: (bool) true
}

Active configuration:
(config.Config) {
 RepositoryRoot: (string) (len=24) "../graylog-project-repos",
 SelectedModules: (string) "",
 Checkout: (config.Checkout) {
  UpdateRepos: (bool) false,
  ShallowClone: (bool) false,
  ManifestFiles: ([]string) <nil>,
  Force: (bool) false,
  ModuleOverride: ([]string) {
  }
 },
 ApplyManifest: (config.ApplyManifest) {
  Execute: (bool) false,
  Force: (bool) false
 },
 Verbose: (bool) false,
 NoUpdateCheck: (bool) false,
 ForceHttpsRepos: (bool) true
}


Compilation output

Is this correct?

Kind Regards

Jake

This is the intended behavior. The 3.0 manifest is building the 3.0 branch, which is tracking the currently developed version of 3.0 (as 3.0.2 would be the next version, it is 3.0.2-SNAPSHOT at the moment).

If you want to build 3.0.1 using graylog-project, copy the 3.0.json to e.g. release-3.0.1.json and change all occurences of "revision": "3.0" to "revision": "3.0.1".

Hope that helps!

Dennis,

In essence, i do the following.

  1. fork the graylog-project repo as I wont be able to commit.
  2. add new manifest with versioning you described.
  3. run graylog-project command with specify my modified graylog-project repo.
  4. Compile etc

Would it not be easier if someone put in the manifest directory a releases directory with them in?

I have put it on the github issues.

Cheers

Jake

1 Like

Hi Jake,

can you help to show details on how to get branch 3.0.1 with graylog-project? it seems i have problem with it.

graylog-project bootstrap https://github.com/Graylog2/graylog-project.git -m /home/graylog/3.0.1.json
    git clone https://github.com/Graylog2/graylog-project.git graylog-project
      正克隆到 'graylog-project'...
    git checkout master
      已经位于 'master'
Repository: https://github.com/Graylog2/graylog2-server.git
Cloning https://github.com/Graylog2/graylog2-server.git into /home/graylog/graylog-project-repos/graylog2-server
    git clone https://github.com/Graylog2/graylog2-server.git /home/graylog/graylog-project-repos/graylog2-server
      正克隆到 '/home/graylog/graylog-project-repos/graylog2-server'...
Checkout revision: 3.0.1
    git branch 3.0.1 origin/3.0.1
    git checkout 3.0.1
      Note: checking out '3.0.1'.
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by performing another checkout.
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -b with the checkout command again. Example:
        git checkout -b new_branch_name
      HEAD 目前位于 de74b68... [graylog2-server] prepare release 3.0.1
Repository: https://github.com/Graylog2/graylog-plugin-collector.git
Cloning https://github.com/Graylog2/graylog-plugin-collector.git into /home/graylog/graylog-project-repos/graylog-plugin-collector
    git clone https://github.com/Graylog2/graylog-plugin-collector.git /home/graylog/graylog-project-repos/graylog-plugin-collector
      正克隆到 '/home/graylog/graylog-project-repos/graylog-plugin-collector'...
Checkout revision: 3.0.1
    git branch 3.0.1 origin/3.0.1
    git checkout 3.0.1
      Note: checking out '3.0.1'.
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by performing another checkout.
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -b with the checkout command again. Example:
        git checkout -b new_branch_name
      HEAD 目前位于 c326fb0... [graylog-plugin-collector] prepare release 3.0.1
Repository: https://github.com/Graylog2/graylog-plugin-aws.git
Cloning https://github.com/Graylog2/graylog-plugin-aws.git into /home/graylog/graylog-project-repos/graylog-plugin-aws
    git clone https://github.com/Graylog2/graylog-plugin-aws.git /home/graylog/graylog-project-repos/graylog-plugin-aws
      正克隆到 '/home/graylog/graylog-project-repos/graylog-plugin-aws'...
Checkout revision: 3.0.1
    git branch 3.0.1 origin/3.0.1
    git checkout 3.0.1
      Note: checking out '3.0.1'.
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by performing another checkout.
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -b with the checkout command again. Example:
        git checkout -b new_branch_name
      HEAD 目前位于 52d0310... [graylog-plugin-aws] prepare release 3.0.1
Repository: https://github.com/Graylog2/graylog-plugin-threatintel.git
Cloning https://github.com/Graylog2/graylog-plugin-threatintel.git into /home/graylog/graylog-project-repos/graylog-plugin-threatintel
    git clone https://github.com/Graylog2/graylog-plugin-threatintel.git /home/graylog/graylog-project-repos/graylog-plugin-threatintel
      正克隆到 '/home/graylog/graylog-project-repos/graylog-plugin-threatintel'...
Checkout revision: 3.0.1
    git branch 3.0.1 origin/3.0.1
    git checkout 3.0.1
      Note: checking out '3.0.1'.
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by performing another checkout.
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -b with the checkout command again. Example:
        git checkout -b new_branch_name
      HEAD 目前位于 a384c42... [graylog-plugin-threatintel] prepare release 3.0.1
Generating pom.xml file from template pom.xml.tmpl
Generating runner/pom.xml file from template runner/pom.xml.tmpl
Generating src/main/assembly/server-tarball.xml file from template src/main/assembly/server-tarball.xml.tmpl
Writing manifest state to .graylog-project-manifest-state

thanks.
Charles

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.