Closed jayaajay closed 8 years ago
/usr/local is intended for files outside of package management: https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-filesystem-usr-local.html
To try and get things more in line with what's expected, can the paths be changed?
Yes, the /usr/local/certs destination was an oversight on my part. We can change it to /etc/certs perhaps, but need to make sure we don't end up clobbering anything there.
@PerilousApricot Change done!
Thanks! Who wants to test it all out?
@PerilousApricot Someone other than me :)
:sunglasses: Once that's shaken out, I'll slam this in.
@PerilousApricot Ok, you can test it and merge it in.
I intended to say code needs to be tested and verified that it works before it gets merged. I wasn't volunteering to do it. :innocent:
Reviewing the code, I don't see how it's possibly going to work. That's why I was wanting you to verify its functionality. For instance, this line makes me skeptical: https://github.com/datalogistics/ibp_server/pull/22/files#diff-56ff1cf358f0de5a25992402d924feafR35
Not only will rpmbuild try to do install -d /usr/bin
(and not install -d ${RPM_BUILD_ROOT}/usr/bin
), which won't work as root ... You are still pulling from /bin in the %files
section. None of it lines up.
Ok, I have set the path to install -d ${RPM_BUILD_ROOT}/usr/bin. I have tested it on centos 7. I could build the rpm and install it as root.
Did you build the RPM as not-root, then install the RPM as root on a machine that didn't previously have the ibp server installed?
What does rpm -qlp <rpm file>
and rpm -qip <rpm file>
return?
1) I built rpm as root and installed it as root as well
2) $rpm -qi accre-ibp-server-1.0-8.el7.x86_64 Name : accre-ibp-server Version : 1.0 Release : 8.el7 Architecture: x86_64 Install Date: Thu 29 Oct 2015 05:58:13 PM EDT Group : Applications/System Size : 4313899 License : ACCRE Signature : (none) Source RPM : accre-ibp-server-1.0-8.el7.src.rpm Build Date : Thu 29 Oct 2015 05:56:28 PM EDT Build Host : 156-56-64-215.dhcp-bl.indiana.edu Relocations : /usr URL : http://www.reddnet.org/ Summary : Internet Backplane Protocol (IBP) Server Description : The Internet Backplane Protocol (IBP) Server handles exposes storage to the network via IBP. It is an integral part of various distributed storage technologies (ex http://www.reddnet.org). In case of bug or issue please report it to data-logistics@googlegroups.org.
$rpm -ql accre-ibp-server-1.0-8.el7.x86_64 /bin/chksum_test /bin/date_spacefree /bin/expire_list /bin/get_alloc /bin/get_config /bin/get_corrupt /bin/get_rid_status /bin/get_version /bin/ibp_attach_rid /bin/ibp_configure.py /bin/ibp_detach_rid /bin/ibp_rescan /bin/ibp_rid_mode /bin/ibp_server /bin/ibp_undelete /bin/mkfs.resource /bin/print_alog /bin/read_alloc /bin/repair_history /bin/testing_leveldb /etc/ibp.cfg /etc/init.d/ibp-server /usr/etc/dlt-ca.bundle /usr/etc/dlt-client.key /usr/etc/dlt-client.pem
Two things:
rpm -qlp
shows exactly what I was talking about in https://github.com/datalogistics/ibp_server/pull/22#issuecomment-152329944 -- you don't have %files
set up correctly. The binaries are going to /bin.Please take some time to double-check this patch does what it says it should.
Thanks!
Sorry, extra thing: Please build the RPMs as not-root.
@PerilousApricot Any other changes needed??
Once this https://github.com/datalogistics/ibp_server/pull/22#issuecomment-152344224 and this https://github.com/datalogistics/ibp_server/pull/22#issuecomment-152344512 are confirmed, we should be good!
@PerilousApricot 1) I built the rpm as non-root and then install it on a clean centos-7 machine. This is what I get when I do rpm -qlp /usr/bin/chksum_test /usr/bin/date_spacefree /usr/bin/expire_list /usr/bin/get_alloc /usr/bin/get_config /usr/bin/get_corrupt /usr/bin/get_rid_status /usr/bin/get_version /usr/bin/ibp_attach_rid /usr/bin/ibp_configure.py /usr/bin/ibp_detach_rid /usr/bin/ibp_rescan /usr/bin/ibp_rid_mode /usr/bin/ibp_server /usr/bin/ibp_undelete /usr/bin/mkfs.resource /usr/bin/print_alog /usr/bin/read_alloc /usr/bin/repair_history /usr/bin/testing_leveldb /usr/etc/dlt-ca.bundle /usr/etc/dlt-client.key /usr/etc/dlt-client.pem /usr/etc/ibp.cfg /usr/etc/init.d/ibp-server
2) I reverted back my change to cmakelists.
I figured there would be more changes :)
@PerilousApricot Files are getting installed to:
/etc/ibp/dlt-ca.bundle /etc/ibp/dlt-client.key /etc/ibp/dlt-client.pem /etc/ibp/ibp.cfg /etc/init.d/ibp-server /usr/bin/chksum_test /usr/bin/date_spacefree /usr/bin/expire_list /usr/bin/get_alloc /usr/bin/get_config /usr/bin/get_corrupt /usr/bin/get_version /usr/bin/ibp_attach_rid /usr/bin/ibp_configure.py /usr/bin/ibp_detach_rid /usr/bin/ibp_rescan /usr/bin/ibp_server /usr/bin/mkfs.resource /usr/bin/print_alog /usr/bin/read_alloc /usr/bin/repair_history
Any other changes? I am sorry. This is the first time, I am coding these spec files. I am learning too :)
I tested RPM build, install, and configure on centos 7 VM and things look good. Last call for updates before we merge.
Giving it a looksee, it looks good to me!
@PerilousApricot I have squashed the commits. Could you please merge it into master.
Thanks for your patience!
@PerilousApricot Thanks for your review :)
Moving the spec file from toolkit folder to RPM folder in ibp_server.