#5504 weekly script to report packages in the koji infra* tags to infrastructure list
Closed: Fixed 8 years ago Opened 8 years ago by kevin.

We would like a small script to run weekly to generate a list of all packages in the koji infra* tags.

Those tags allow us to build packages that are not in Fedora/EPEL for whatever reasons and use them safely. However, we (usually) don't want packages to stay in those tags forever. Most packages should move on to being reviewed and get added to Fedora/EPEL and we should use them from there.

This report will allow us to see what packages are in there and make us aware of any that should be removed now.

The tags can be listed with the koji command line tool:

% koji list-tags | grep infra$
dist-5E-epel-infra
epel6-infra
epel7-infra
f23-infra
f24-infra
f25-infra

(These will change as we go, so the script should look up the current active list).

Packages in each tag can be listed with:

koji list-pkgs --tag=f24-infra --noinherit

Script can be in shell or python.


I write it in bash script

ok, a good first stab. :smile:

But some more reqirements/requests:

  • Can you have it just use a tmp file with mktemp ? We don't need to keep logs around on it.

  • Can you have it then just email the complete output to the infrastructure list.

Thanks again for working on this...

i run the script and it post output to the infrastructure list:
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org/thread/LT4W7IS7UTLS5VNTK254W7T4XHUNWPFI/

If it looks good you can close this ticket

updated script
sending email to infrastructure-owner@lists.fedoraproject.org by accident but change back to: infrastructure@lists.fedoraproject.org
koji-infra-tags.sh

Great. Thanks for working on this.

First, this shows us that we had an old dist-5E-epel-infra tag that we need to get rid of. ;) That tag isn't actually one we need to care about, you can remove it from the script.

Also, can you use mktemp instead of using hard coded temp names?

See: https://www.mktemp.org/manual.html
something like:

TMPFILE=‘mktemp‘ || exit 1
each command >> $TMPFILE

That way we arent using predicable temp files that someone could put in place before us.

Also, at the end make sure to 'rm -f $TMPFILE' so it's removed and we don't leave one laying around every week.

Feel free to ask for more info on any of those suggestions.

This looks pretty good, but its got some odd output:

cat: mktemp: input file is output file
cat: mktemp: input file is output file
cat: mktemp: input file is output file
cat: mktemp: input file is output file

Can you fix that up and then I think we will be done here. ;) Thanks again for working on this.

alda: i run that script and it works. It produce the same output since you make your bash script way simple than mine atleast it shows the same result

marc84: I used your well coded script and only add loop which itterate over tags, so they dont need to be staticaly defined. So thanks for your good work.

Pushed out to batcave01 in ansible commit 616489674176809bae3b97a2b543bb2007ce30f3

Thanks!

@kevin changed the status to Fixed

8 years ago

Log in to comment on this ticket.

Metadata
Attachments 7
Attached 8 years ago View Comment
Attached 8 years ago View Comment
Attached 8 years ago View Comment
Attached 8 years ago View Comment
Attached 8 years ago View Comment
Attached 8 years ago View Comment
Attached 8 years ago View Comment