The latest librenms releases expect PHP composer to be run. That is difficult to do at package build time, but we might be able to do it. In the meantime, I have resorted to manually creating the expected tarball.
Details
- Reviewers
bofh mat - Commits
- rP478715: Upgrade to 1.42.01
The maintainer needs to run the commands on each release and then
upload the resulting vendor directory tarball:
git clone git@github.com:librenms/librenms.git
avoid php warnings/errors
in /usr/local/etc/php.ini set:
date.timezone = "UTC"
install required packages
pkg install php56-mysqli php56-session php56-gd php56-tokenizer php56-xmlwriter php56-curl php56-xml php56-pdo
get the upstream code
git clone git@github.com:librenms/librenms.git
select the release we are buliding
cd librenms
git checkout tags/1.42.01
use composer to build the vendor directory
./scripts/composer_wrapper.php install --no-dev
create the tarball
mv vendor librenms-vendor-1.42.01
tar -czf librenms-vendor-1.42.01.tar.gz librenms-vendor-1.42.01
copy it to where it can be fetched:
scp librenms-vendor-1.42.01.tar.gz freefall:~/public_distfiles/
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
net-mgmt/librenms/Makefile | ||
---|---|---|
10 ↗ | (On Diff #47440) | I have no idea if this is the correct way to specify additional MASTER_SITES and DISTFILES It is working, but I suspect there is a better way. |
163 ↗ | (On Diff #47440) | The upstream vendor code expects to write to this location, hence the +w I don't like it. I would prefer the code did not do this, but there is no known configuration change which will affect this. |
net-mgmt/librenms/files/pkg-message.in | ||
33 ↗ | (On Diff #47440) | This is something I wish we could do for the user, but it is site-specific and generates a key for the app. |
net-mgmt/librenms/Makefile | ||
---|---|---|
10 ↗ | (On Diff #47440) | It is not, as make fetch-urlall-list will show you. Read 5.4.9. Multiple Distribution or Patches Files from Multiple Locations |
net-mgmt/librenms/Makefile | ||
---|---|---|
11 ↗ | (On Diff #47451) | I am going to change this to use PORTVERSION etc. |
12 ↗ | (On Diff #47451) | Is this an appropriate way to name the vendor distfile? |
10 ↗ | (On Diff #47440) | Ahh, I did not see that when searching. merci. $ make fetch-urlall-list http://distcache.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz http://distcache.us-east.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz http://distcache.eu.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz http://distcache.us-west.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz http://distcache.FreeBSD.org/ports-distfiles/librenms-vendor-1.42.01.tar.gz https://codeload.github.com/librenms/librenms/tar.gz/1.42.01?dummy=/librenms-librenms-1.42.01_GH0.tar.gz http://distcache.FreeBSD.org/ports-distfiles/librenms-librenms-1.42.01_GH0.tar.gz https://codeload.github.com/librenms/librenms/tar.gz/1.42.01?dummy=/librenms-librenms-1.42.01_GH0.tar.gz http://distcache.FreeBSD.org/ports-distfiles/librenms-librenms-1.42.01_GH0.tar.gz |
net-mgmt/librenms/Makefile | ||
---|---|---|
9–12 ↗ | (On Diff #47452) | Remove all the :librenms stuff, it's already added, correctly, by USE_GITHUB. |
Add .env.example & patch it for simple use
Patch includes/common.php so the about has a valid version and date
Remove :librenms from DISTFILES and MASTER_SITES because GH fixes that.
net-mgmt/librenms/Makefile | ||
---|---|---|
21–24 ↗ | (On Diff #47486) | Wrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles. |
10 ↗ | (On Diff #47440) | You should probably use ports-mgmt/distilator to check things instead of relying on eyes and fetch-urlall-list :-) |
Ready to commit now, after removing PORTREVISION
net-mgmt/librenms/Makefile | ||
---|---|---|
21–24 ↗ | (On Diff #47486) | I moved a whole bunch of stuff around. |
10 ↗ | (On Diff #47484) | This must be removed before the commit. |
9 ↗ | (On Diff #47463) | This is for net-mgmt/librenms/files/patch-includes_common.php The code expects a timestamp value. |
9–12 ↗ | (On Diff #47452) | Yes, I noticed this: ===> Extracting for librenms-1.42.01_5,1 => SHA256 Checksum OK for librenms-vendor-1.42.01.tar.gz. => SHA256 Checksum OK for librenms-librenms-1.42.01_GH0.tar.gz. => SHA256 Checksum OK for librenms-librenms-1.42.01_GH0.tar.gz. |
10 ↗ | (On Diff #47440) | This is a nice tool. Thank you. $ distilator . 301 [WWW] http://www.librenms.org -> https://www.librenms.org/ 200 [DISTFILE] http://distcache.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz 200 [DISTFILE] http://distcache.eu.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz 200 [DISTFILE] https://codeload.github.com/librenms/librenms/tar.gz/1.42.01?dummy=/librenms-librenms-1.42.01_GH0.tar.gz 200 [DISTFILE] http://distcache.us-west.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz 200 [DISTFILE] http://distcache.us-east.FreeBSD.org/local-distfiles/dvl/librenms-vendor-1.42.01.tar.gz |
net-mgmt/librenms/files/patch-config.php.default | ||
7 ↗ | (On Diff #47466) | This patch tells the code that we were installed from a package, not from git. |
net-mgmt/librenms/files/patch-includes_common.php | ||
24 ↗ | (On Diff #47466) | It is valid to have git installed but be installed from a package. |
11 ↗ | (On Diff #47463) | The code assumes we have installed via git clone. This new code will ensure the /about/ page will populate. |
net-mgmt/librenms/files/pkg-message.in | ||
58 ↗ | (On Diff #47482) | Ahh yes, this needs to be added to your configuration file. I think I will also create an UPDATING entry. |
net-mgmt/librenms/Makefile | ||
---|---|---|
23 ↗ | (On Diff #47534) | Wrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles. |
25 ↗ | (On Diff #47534) | Why +=? |
net-mgmt/librenms/files/pkg-message.in | ||
2 ↗ | (On Diff #47534) | %%LOCALBASE%%/etc/mysql/my.cnf. |