[opensuse-packaging] I'm having a problem building packages for openSUSE...
Hi, I had a potential user ask me to provide the Assimilation project software for openSUSE. So, I started down that path to see if I could help him out. We have a good method of building packages for different distros using Docker - so that's what I did. I started with the Dockerfile I use to build CentOS and Fedora, but I ran into troubles on the 42.1 build. This is the version I get when I say "opensuse:latest" on Docker. Our code builds with cmake, not autotools. What's happens is that rpmbuild does a mkdir build, cd/pushd build twice. And then it invokes cmake with "*..*" as its argument. Either it needs to not do the mkdir/cd twice (which is what I suspect), or it needs to invoke cmake with "*../..*" as its argument. My annotations are on lines with ========= in them... Any idea what's going on here, and how I can work around this? Below is the output from the rpmbuild process... Step 24 : RUN rpmbuild -ba /root/assimilation/src/docker/CentOS6/assimilation-cma.spec --define="assimversion $GITPATH" ---> Running in 54a609390b06 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.uT0G2n [91m+ umask 022 + cd /usr/src/packages/BUILD [0m[91m+ /bin/pwd [0m/usr/src/packages/BUILD [91m+ ls -l [0mtotal 0 [91m+ cd /usr/src/packages/BUILD [0m[91m+ rm -rf assimilation-assimilation-official-662be35 [0m[91m+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/assimilation-assimilation-official-662be35.tgz [0m[91m+ /bin/tar -xf - [0m[91m+ STATUS=0 [0m[91m+ '[' 0 -ne 0 ']' + cd assimilation-assimilation-official-662be35 [0m[91m+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . [0m[91m+ exit 0 [0mExecuting(%build): /bin/sh -e /var/tmp/rpm-tmp.S47KBW [91m+ umask 022 + cd /usr/src/packages/BUILD [0m[91m+ /usr/bin/rm -rf /usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64 [0m[91m++ dirname /usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64 [0m[91m+ /usr/bin/mkdir -p /usr/src/packages/BUILDROOT [0m[91m+ /usr/bin/mkdir /usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64 [0m[91m+ cd assimilation-assimilation-official-662be35 =============== this is the first mkdir/pushd ===================== [0m[91m+ *mkdir -p buil**d* [0m[91m+ *pushd build* [0m/usr/src/packages/BUILD/assimilation-assimilation-official-662be35/build /usr/src/packages/BUILD/assimilation-assimilation-official-662be35 [91m+ find . -name CMakeLists.txt -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE /}' '{}' + =============== this is the second (extra/incorrect) mkdir/cd ============ [0m[91m+ *mkdir -p build* [0m[91m+ *cd build* =============== Here is the cmake that is going to fail ========== [0m[91m+***/usr/bin/cmake* *..* -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=None '-DCMAKE_C_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_CXX_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules -DCMAKE_USER_MAKE_RULES_OVERRIDE=/usr/share/cmake/Modules/opensuse_rules.cmake .. -DCMAKE_SKIP_BUILD_RPATH=1 [0m[91mCMake Error: The source directory "/usr/src/packages/BUILD/assimilation-assimilation-official-662be35/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. [0m[91merror: Bad exit status from /var/tmp/rpm-tmp.S47KBW (%build) [0m[91m Bad exit status from /var/tmp/rpm-tmp.S47KBW (%build) [0m RPM build errors: time="2015-12-01T19:40:46-07:00" level=info msg="The command [/bin/sh -c rpmbuild -ba /root/assimilation/src/docker/CentOS6/assimilation-cma.spec --define=\"assimversion $GITPATH\"] returned a non-zero code: 1" What you find if you look at the directory structure is that in the source directory there is a directory named build, and under it is another directory named build. This matches the log information above, and the behavior I saw. Here's a summary of what happened: - mkdir -p build - pushd build - mkdir -p build - cd build Build fails because the CMakeLists.txt file is named "../../CMakeLists.txt", NOT "../CMakeLists.txt" -- Alan Robertson / CTO AlanR@AssimilationSystems.com mailto:AlanR@AssimilationSystems.com/ +1 303.947.7999 Assimilation Systems Limited http://AssimilationSystems.com Twitter https://twitter.com/ossalanr Linkedin https://www.linkedin.com/in/alanr skype https://htmlsig.com/skype?username=alanr_unix.sh -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
03.12.2015 18:08, Alan Robertson пишет:
Hi,
I had a potential user ask me to provide the Assimilation project software for openSUSE. So, I started down that path to see if I could help him out. We have a good method of building packages for different distros using Docker - so that's what I did.
I miss spec file or link you your project ... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Andrei, Good point ;-). Thanks for reminding me.Not sure where my brain was... I guess I was into wishful thinking - this was a known problem with a simple workaround... Here are a few links: http://AssimilationSystems.com - project overview page https://github.com/assimilation/assimilation-official https://github.com/assimilation/assimilation-official/tree/master/docker/ope... https://github.com/assimilation/assimilation-official/blob/master/docker/Cen... So, if you pull the latest source, and cd to the docker/openSUSE directory, mkdir 42.1 and then run ./dockit 42.1, then you should get exactly these results. I see that the openSUSE 42.1 docker image has been updated since I last tried it (a day or two ago). The updated onebehaves the same way. I didn't write this spec file, and hadn't looked at it in a while... The specfile has a single mkdir/pushd in it, but doesn't have the second mkdir+cd. I have no idea where that's coming from - but it's not in the spec file. Thanks for your help! On 12/03/2015 09:25 AM, Andrei Borzenkov wrote:
03.12.2015 18:08, Alan Robertson пиÑеÑ:
Hi,
I had a potential user ask me to provide the Assimilation project software for openSUSE. So, I started down that path to see if I could help him out. We have a good method of building packages for different distros using Docker - so that's what I did.
I miss spec file or link you your project ...
-- Alan Robertson / CTO AlanR@AssimilationSystems.com mailto:AlanR@AssimilationSystems.com/ +1 303.947.7999 Assimilation Systems Limited http://AssimilationSystems.com Twitter https://twitter.com/ossalanr Linkedin https://www.linkedin.com/in/alanr skype https://htmlsig.com/skype?username=alanr_unix.sh -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
03.12.2015 23:34, Alan Robertson пишет:
Hi Andrei,
Good point ;-). Thanks for reminding me.Not sure where my brain was... I guess I was into wishful thinking - this was a known problem with a simple workaround...
Here are a few links: http://AssimilationSystems.com - project overview page https://github.com/assimilation/assimilation-official
https://github.com/assimilation/assimilation-official/tree/master/docker/ope...
https://github.com/assimilation/assimilation-official/blob/master/docker/Cen...
So, if you pull the latest source, and cd to the docker/openSUSE directory, mkdir 42.1 and then run ./dockit 42.1, then you should get exactly these results.
%cmake macro does "cd build" for you. %cmake \ find . -name CMakeLists.txt \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ mkdir -p build \ cd build \ %__cmake .. \\\ ...
I see that the openSUSE 42.1 docker image has been updated since I last tried it (a day or two ago). The updated onebehaves the same way.
I didn't write this spec file, and hadn't looked at it in a while... The specfile has a single mkdir/pushd in it, but doesn't have the second mkdir+cd.
I have no idea where that's coming from - but it's not in the spec file.
Thanks for your help!
On 12/03/2015 09:25 AM, Andrei Borzenkov wrote:
03.12.2015 18:08, Alan Robertson пиÑеÑ:
Hi,
I had a potential user ask me to provide the Assimilation project software for openSUSE. So, I started down that path to see if I could help him out. We have a good method of building packages for different distros using Docker - so that's what I did.
I miss spec file or link you your project ...
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
03.12.2015 23:34, Alan Robertson пишет:
Hi Andrei,
Good point ;-). Thanks for reminding me.Not sure where my brain was... I guess I was into wishful thinking - this was a known problem with a simple workaround... This is likely a common/known problem for people who use cmake and start
On 12/03/2015 08:38 PM, Andrei Borzenkov wrote: their RPM spec files working on that red distribution or one of its clones. Apparently, on those distributions, they expect you to do the mkdir+cd/pushd yourself - and SuSE does both for you. But, it's now working quite nicely. The spec file is here: https://github.com/assimilation/assimilation-official/blob/master/docker/Cen... Thanks to your help, the next Assimilation release will provide openSUSE 13.2 and 42.1 RPMs. Unfortunately, I can't easily provide 13.1 releases (even though it's been selected as long term) because there is no libsodium for 13.1. *Is there any mechanism for requesting to have libsodium added to 13.1? [or is it frozen?]* And - for good measure, no one should be using or providing 1.0.0 of libsodium due to a potentially fatal (crash) bug in the library. It's quite unlikely to occur, but if if does, the client application will crash. Thanks for the help! -- Alan Robertson / CTO AlanR@AssimilationSystems.com mailto:AlanR@AssimilationSystems.com/ +1 303.947.7999 Assimilation Systems Limited http://AssimilationSystems.com Twitter https://twitter.com/ossalanr Linkedin https://www.linkedin.com/in/alanr skype https://htmlsig.com/skype?username=alanr_unix.sh -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Alan, On Sat, Dec 05, 2015 at 09:11:55AM -0700, Alan Robertson wrote:
03.12.2015 23:34, Alan Robertson пишет:
Hi Andrei,
Good point ;-). Thanks for reminding me.Not sure where my brain was... I guess I was into wishful thinking - this was a known problem with a simple workaround... This is likely a common/known problem for people who use cmake and start
On 12/03/2015 08:38 PM, Andrei Borzenkov wrote: their RPM spec files working on that red distribution or one of its clones.
Apparently, on those distributions, they expect you to do the mkdir+cd/pushd yourself - and SuSE does both for you.
But, it's now working quite nicely. The spec file is here: https://github.com/assimilation/assimilation-official/blob/master/docker/Cen...
Create a project in the openSUSE Build Service (OBS) which pulls in the assimilation-cma.spec via git automatically.
Thanks to your help, the next Assimilation release will provide openSUSE 13.2 and 42.1 RPMs.
How are you creating the packages? Have you consider to make use of the OBS?
Unfortunately, I can't easily provide 13.1 releases (even though it's been selected as long term) because there is no libsodium for 13.1.
*Is there any mechanism for requesting to have libsodium added to 13.1? [or is it frozen?]*
All is possible and all you need to do is to file a maintenance request against the openSUSE:13.1:Update OBS project.
And - for good measure, no one should be using or providing 1.0.0 of libsodium due to a potentially fatal (crash) bug in the library. It's quite unlikely to occur, but if if does, the client application will crash.
Which openSUSE versions make use of 1.0.0 and what should they use instead? Better is to point the libsodium maintainer(s) to the particular commit which addresses the crash bug. Then it's quite easy to add the required commit(s) to the existimg sources. That's the general rule. Sometimes we even do minor version updates. Cheers, Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
Hi Alan,
On Sat, Dec 05, 2015 at 09:11:55AM -0700, Alan Robertson wrote:
03.12.2015 23:34, Alan Robertson пишет:
Hi Andrei,
Good point ;-). Thanks for reminding me.Not sure where my brain was... I guess I was into wishful thinking - this was a known problem with a simple workaround... This is likely a common/known problem for people who use cmake and start
On 12/03/2015 08:38 PM, Andrei Borzenkov wrote: their RPM spec files working on that red distribution or one of its clones.
Apparently, on those distributions, they expect you to do the mkdir+cd/pushd yourself - and SuSE does both for you.
But, it's now working quite nicely. The spec file is here: https://github.com/assimilation/assimilation-official/blob/master/docker/Cen... Create a project in the openSUSE Build Service (OBS) which pulls in the assimilation-cma.spec via git automatically.
Thanks to your help, the next Assimilation release will provide openSUSE 13.2 and 42.1 RPMs. How are you creating the packages? Have you consider to make use of the OBS? I did at one point. After spending a few hours reading the documents, I couldn't figure it out. Also, I run tests on each platform. These tests require root permissions. Also I need a few python packages for which
Hi Lars, Long time no talk! Hope all is going well for you! [Sorry you'll get this a few times] On 12/05/2015 09:29 AM, Lars Müller wrote: there are no corresponding RPMs. One for building, a couple for testing, and I think two for the installed CMA packages. None for the nanoprobes. I build them all on my desktop or laptop or whatever using Docker. It works really well. It's quite fast, noticeably faster than a VM environment. I have even rebuilt releases while traveling. My laptop might be a half-hour slower than my desktop for the 10 versions of Linux that we release it for, but it's quite acceptable. Most of the time is spent running the tests. I build the software in two different ways, then I install the package, and I run my tests. For 10 releases this takes about 2 hours. Before putting out an official release, I run some system-level tests, validate the versions for consistency, checksum the packages, and other things. I doubt OBS would be much if any faster than doing it on my own hardware. There is an annoying Docker bug that keeps me from building more than one at a time. I have plenty of resources to do it, but Docker gets confused. I need to document that bug for them... What I really like about building it all myself is that it's much faster to debug than when I run into a problem. When it's working, I don't care so much how fast it is ;-)
Unfortunately, I can't easily provide 13.1 releases (even though it's been selected as long term) because there is no libsodium for 13.1.
*Is there any mechanism for requesting to have libsodium added to 13.1? [or is it frozen?]* All is possible and all you need to do is to file a maintenance request against the openSUSE:13.1:Update OBS project. Where do I go to do that? And - for good measure, no one should be using or providing 1.0.0 of libsodium due to a potentially fatal (crash) bug in the library. It's quite unlikely to occur, but if if does, the client application will crash. Which openSUSE versions make use of 1.0.0 and what should they use instead? 13.2 provides 1.0.0. You can just use 1.0.1 - IIRC, it's mainly this bug fix. I didn't run against any bugs in 1.0.1 or later. I run two of my tests under valgrind, and those two failed with 1.0.0 - until I put in a valgrind exception to allow for the bug in libsodium.
The bug goes like this: When encrypting, 1.0.0 reads two more bytes from the buffer (or key?) than I told it to. Those bytes don't go into the crypto stream and don't affect the results. If that buffer is exactly at the end of a page, and the next page in your address space isn't there (isn't valid), then you will crash. This is very unlikely, but possible. I found the problem before 1.0.1 had come out, so I had to put in the workaround in my valgrind tests. So, I would only care if one of my customers crashed as a result. Again, it's very unlikely, but possible. There have been no API changes at least up until 1.0.5. I've tested with most of versions along the way. Not extensively, but enough to know that they work fine and I haven't had to change my code at all. In fact, I've never had to change my code for libsodium versions.
Better is to point the libsodium maintainer(s) to the particular commit which addresses the crash bug. Then it's quite easy to add the required commit(s) to the existimg sources. That's the general rule. Sometimes we even do minor version updates. I don't know who those maintainers are. I haven't done much with SuSE since I got laid off in 2000.
-- Alan Robertson / CTO AlanR@AssimilationSystems.com mailto:AlanR@AssimilationSystems.com/ +1 303.947.7999 Assimilation Systems Limited http://AssimilationSystems.com Twitter https://twitter.com/ossalanr Linkedin https://www.linkedin.com/in/alanr skype https://htmlsig.com/skype?username=alanr_unix.sh -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Alan Robertson
-
Andrei Borzenkov
-
Lars Müller