[opensuse-buildservice] pre_checkin.sh and obs_scm git service
[next try here, since this request seems to be misplaced in -packaging] Hi, if I understand the pre_checkin.sh concept correctly (docs are quite sparse to put it friendly: https://en.opensuse.org/ openSUSE:Build_Service_Concept_PreCheckinFeatures) pre_checkin.sh is executed on check in time, but I'm looking for a similar mechanism, that is executed after git checkout and before build on the server (pre_build.sh?) Background: in order to produce a reproducible build, sometimes, we need to generate the necessary information from running a script out of the git tree. Example: https://build.opensuse.org/package/show/home:frispete:Tumbleweed/HandBrake While at it, with obs_scm in default mode and changesgenerate option enabled, changelog handling is suboptimal as well. It would be cool to have changespersistent option, that would copy the _service:obs_scm:HandBrake.changes to the HandBrake.changes, as this process would do in disabled mode. Of course, this changespersistent option could be dealed with in a pre_build.sh as well... Thanks, Pete -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Montag, 2. September 2019, 14:34:26 CEST Hans-Peter Jansen wrote:
[next try here, since this request seems to be misplaced in -packaging]
Hi,
if I understand the pre_checkin.sh concept correctly (docs are quite sparse to put it friendly: https://en.opensuse.org/ openSUSE:Build_Service_Concept_PreCheckinFeatures) pre_checkin.sh is executed on check in time, but I'm looking for a similar mechanism, that is executed after git checkout and before build on the server (pre_build.sh?)
pre_build.sh is not an obs concept, just a private script which may be called by the user... OBS tools will never call random scripts on your workstation outside of a secured VM, since it is a security issue.
Background: in order to produce a reproducible build, sometimes, we need to generate the necessary information from running a script out of the git tree. Example: https://build.opensuse.org/package/show/home:frispete:Tumbleweed/HandBrake
While at it, with obs_scm in default mode and changesgenerate option enabled, changelog handling is suboptimal as well. It would be cool to have changespersistent option, that would copy the _service:obs_scm:HandBrake.changes to the HandBrake.changes, as this process would do in disabled mode.
when running in the disabled mode it should be indeed get moved over. This is done by osc, so I doubt a bit that it just not works for a single file. Are you sure that this won't happen?
Of course, this changespersistent option could be dealed with in a pre_build.sh as well...
Thanks, Pete
-- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany (HRB 247165, AG München), Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am Montag, 2. September 2019, 15:53:17 CEST schrieb Adrian Schröter:
On Montag, 2. September 2019, 14:34:26 CEST Hans-Peter Jansen wrote:
[next try here, since this request seems to be misplaced in -packaging]
Hi,
if I understand the pre_checkin.sh concept correctly (docs are quite sparse to put it friendly: https://en.opensuse.org/ openSUSE:Build_Service_Concept_PreCheckinFeatures) pre_checkin.sh is executed on check in time, but I'm looking for a similar mechanism, that is executed after git checkout and before build on the server (pre_build.sh?)
pre_build.sh is not an obs concept, just a private script which may be called by the user...
OBS tools will never call random scripts on your workstation outside of a secured VM, since it is a security issue.
Understood. It would work in the build environment as well, it just needs access to the git tree, and need to generate a file - or would you prefer to carry the git tree around in the builds?
Background: in order to produce a reproducible build, sometimes, we need to generate the necessary information from running a script out of the git tree. Example: https://build.opensuse.org/package/show/home:frispete:Tumbleweed/HandBrake
While at it, with obs_scm in default mode and changesgenerate option enabled, changelog handling is suboptimal as well. It would be cool to have changespersistent option, that would copy the _service:obs_scm:HandBrake.changes to the HandBrake.changes, as this process would do in disabled mode.
when running in the disabled mode it should be indeed get moved over. This is done by osc, so I doubt a bit that it just not works for a single file.
Are you sure that this won't happen?
In disabled mode, the changes are persistent, but not in the default (when-no- mode-is-specified?) mode. Without this option, the delta between the last manual change and current state appears as a single entry. Sometimes, it would be nice to keep the change history.. Cheers, Pete -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 02.09.19 um 17:50 schrieb Hans-Peter Jansen:
Understood.
It would work in the build environment as well, it just needs access to the git tree, and need to generate a file - or would you prefer to carry the git tree around in the builds?
What's the difference between running your script as service or as part of %setup in this context? Greetings, Stephan -- Lighten up, just enjoy life, smile more, laugh more, and don't get so worked up about things. Kenneth Branagh -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am Dienstag, 3. September 2019, 09:02:20 CEST schrieb Stephan Kulow:
Am 02.09.19 um 17:50 schrieb Hans-Peter Jansen:
Understood.
It would work in the build environment as well, it just needs access to the git tree, and need to generate a file - or would you prefer to carry the git tree around in the builds?
What's the difference between running your script as service or as part of %setup in this context?
The .git tree, or the absence thereof. It would change the workflow by the need to package the .git tree, which will appear in the source rpm as well, and add git as a build dependency. I don't think, this is desired, but maybe it's our best bet anyway. Cheers, Pete -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 9/3/19 11:06 AM, Hans-Peter Jansen wrote:
Am Dienstag, 3. September 2019, 09:02:20 CEST schrieb Stephan Kulow:
Am 02.09.19 um 17:50 schrieb Hans-Peter Jansen:
Understood.
It would work in the build environment as well, it just needs access to the git tree, and need to generate a file - or would you prefer to carry the git tree around in the builds?
What's the difference between running your script as service or as part of %setup in this context?
The .git tree, or the absence thereof.
It would change the workflow by the need to package the .git tree, which will appear in the source rpm as well, and add git as a build dependency. I don't think, this is desired, but maybe it's our best bet anyway.
If you use obs_scm you get a cpio of the full git tree into your source tree. Normally you combine this with the 'tar' source service to create a tar for the source rpm, but I see no reason why you couldn't update the tar if your spec file notices the presence of the .obscpio archive. Just an idea. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Adrian Schröter
-
Hans-Peter Jansen
-
Stephan Kulow