Re: [opensuse-buildservice] .oscignore to ignore tarballs downloaded by source service?
(I got this reply privately, but I think it was meant for the list) On 13.4.2011 15:28, Michal Vyskocil wrote:
On Wed, Apr 13, 2011 at 11:36:25AM +0200, Michal Marek wrote:
Hi,
I see there is no way to set ignore patterns on a per-package basis, i.e. some .oscignore or rather _oscignore file. Would you accept a patch that adds such feature?
The problem I'm trying to solve is following: The kernel-source package is maintained in a git repository and a script exists to generate a source package that can be built using rpmbuild, osc build or the buildservice. To avoid having to upload the 70M+ linux tarball each time you branch the package in the buildservice, I would like to use the download_url service to let the server download it. But at the same
Well, as osc build runs all service files by default on each build, which is braindead, as people will be really confused why their build has a delay (during it they can download 70MB big file ...).
I don't observe this with osc-0.130.1 2, osc build uses the existing _service:download_url:linux-2.6.39-rc3.tar.bz2 tarball.
time, I would like to have the tarball locally as before, so that plain rpmbuild works. But then I need to tell osc to ignore the linux tarball and avoid messages like this:
$ osc ci File "linux-2.6.38.tar.bz2" is listed in package meta but does not exist. (s)kip/(r)emove/(e)dit file lists/(c)ommit/(A)bort?
You can either skip this check by -f or check_filelist in ~/.oscrc, see source code
3087 if conf.config['check_filelist'] and not opts.force: 3088 check_filelist_before_commit(pacs)
I'm aware of the global config, but this is really specific to one package.
As an original author I'd say we can remove this one, as this is a duplicate of source-validator.
Great, that would solve my problem. I don't care if the tarball shows up with a question mark in 'osc status', as long as it doesn't complain during commit.
If you want to write a patch, then consider reverting of existing braindead osc build logic and add add --service, --force-service, or --run-service option to force a _service execution. Or in the most clever case, save a time of last execution and compare a timestamp, so the _service files will be triggered only in case of change.
The current logic works fine for my specific use case. Michal -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
This duplicates the work of the source validator and is just annoying.
Suggested-by: Michal Vyskocil
Michal Marek wrote:
This duplicates the work of the source validator and is just annoying.
The source validator doesn't check whether a referenced file is actually tracked by osc though, or does it? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
This duplicates the work of the source validator and is just annoying.
Suggested-by: Michal Vyskocil
This duplicates the work of the source validator and is just annoying.
Suggested-by: Michal Vyskocil
Signed-off-by: Michal Marek
Hi Rudi, can you have a look at this patch? I also created a merge request on gitorious: https://gitorious.org/opensuse/osc-source_validator/merge_requests/1 Michal On 14.4.2011 14:05, Michal Marek wrote:
Signed-off-by: Michal Marek
--- 20-files-present-and-referenced | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/20-files-present-and-referenced b/20-files-present-and-referenced index 146bd84..a456e0e 100755 --- a/20-files-present-and-referenced +++ b/20-files-present-and-referenced @@ -135,11 +135,26 @@ for i in `cat $TMPDIR/sources` ; do done mv $TMPDIR/sources.t $TMPDIR/sources
+check_tracked() +{ + local file=${1##*/} + + if ! test -f "$DIR_TO_CHECK/$file"; then + echo "$file mentioned in spec file does not exist." + return 1 + fi + if test -f "$DESTINATIONDIR/$file"; then + return 0 + fi + if grep -qsFx "$file" "$DESTINATIONDIR/_to_be_added"; then + return 0 + fi + echo "$file mentioned in spec file is not tracked." + return 1 +} + for HASTOBETHER in `cat $TMPDIR/sources` ; do - test -f $DIR_TO_CHECK/$HASTOBETHER || { - echo $HASTOBETHER mentioned in spec file does not exist. - RETURN=1 - } + check_tracked "$HASTOBETHER" || RETURN=1 done
#
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Friday 15 April 2011 11:06:22 Michal Marek wrote:
Hi Rudi, can you have a look at this patch? I also created a merge request on gitorious: https://gitorious.org/opensuse/osc-source_validator/merge_requests/1
well, this just opens up another hole to keep arbitrary files in the sources without having them mentioned in the specfile. What's the rationale to do this (and potentially not being able to rebuild a package from it's src-rpm) ?
Michal
On 14.4.2011 14:05, Michal Marek wrote:
Signed-off-by: Michal Marek
--- 20-files-present-and-referenced | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/20-files-present-and-referenced b/20-files-present-and-referenced index 146bd84..a456e0e 100755 --- a/20-files-present-and-referenced +++ b/20-files-present-and-referenced @@ -135,11 +135,26 @@ for i in `cat $TMPDIR/sources` ; do done mv $TMPDIR/sources.t $TMPDIR/sources
+check_tracked() +{ + local file=${1##*/} + + if ! test -f "$DIR_TO_CHECK/$file"; then + echo "$file mentioned in spec file does not exist." + return 1 + fi + if test -f "$DESTINATIONDIR/$file"; then + return 0 + fi + if grep -qsFx "$file" "$DESTINATIONDIR/_to_be_added"; then + return 0 + fi + echo "$file mentioned in spec file is not tracked." + return 1 +} + for HASTOBETHER in `cat $TMPDIR/sources` ; do - test -f $DIR_TO_CHECK/$HASTOBETHER || { - echo $HASTOBETHER mentioned in spec file does not exist. - RETURN=1 - } + check_tracked "$HASTOBETHER" || RETURN=1 done
#
-- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux fatou 2.6.38-2-desktop #1 SMP PREEMPT 2011-03-15 17:12:01 +0100 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 15.4.2011 14:05, Ruediger Oertel wrote:
On Friday 15 April 2011 11:06:22 Michal Marek wrote:
Hi Rudi, can you have a look at this patch? I also created a merge request on gitorious: https://gitorious.org/opensuse/osc-source_validator/merge_requests/1
well, this just opens up another hole to keep arbitrary files in the sources without having them mentioned in the specfile. What's the rationale to do this (and potentially not being able to rebuild a package from it's src-rpm) ?
I don't understand you now. What I'm trying to achieve is to check not only if a referenced file is in the source directory, but if it is also tracked by osc (i.e. if the packager didn't accidentally forget to 'osc add' it). The opposite check, if everything in the source directory is also referenced by the specfile, comes a few lines later (after "# now check if everything is marked in spec files.") and I didn't modify it. At least I didn't intend to :). The rationale for this is that a similar check exists in osc and they overlap a bit, so I'm removing the osc check and adding the missing bits here. Michal -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Friday 15 April 2011 14:19:02 Michal Marek wrote:
I don't understand you now. What I'm trying to achieve is to check not only if a referenced file is in the source directory, but if it is also tracked by osc (i.e. if the packager didn't accidentally forget to 'osc add' it). The opposite check, if everything in the source directory is also referenced by the specfile, comes a few lines later (after "# now check if everything is marked in spec files.") and I didn't modify it. At least I didn't intend to :).
The rationale for this is that a similar check exists in osc and they overlap a bit, so I'm removing the osc check and adding the missing bits here.
argh ... sorry, my oversight. thanks for the explanation. -- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux fatou 2.6.38-2-desktop #1 SMP PREEMPT 2011-03-15 17:12:01 +0100 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Ludwig Nussel
-
Michal Marek
-
Ruediger Oertel