What I want to do
Build my yum/dnf repository on a cifs share.
My windows server is my main file server, and I store my Support/Platforms/Korora22/ directory there for the time being. I have my rpms there, some downloaded and some self-rolled.
I want to host a repository there, but my
createrepo . command throws back this error:
[root@linux-05|/mnt/smash/Support/Platforms/Korora22]# createrepo . Spawning worker 0 with 3 pkgs Spawning worker 1 with 3 pkgs Spawning worker 2 with 2 pkgs Spawning worker 3 with 2 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs (process:368): GLib-CRITICAL **: g_timer_stop: assertion 'timer != NULL' failed (process:368): GLib-CRITICAL **: g_timer_destroy: assertion 'timer != NULL' failed Traceback (most recent call last): File "/usr/share/createrepo/genpkgmetadata.py", line 308, in <module> main(sys.argv[1:]) File "/usr/share/createrepo/genpkgmetadata.py", line 280, in main mdgen.doRepoMetadata() File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 1005, in doRepoMetadata rp.getOtherdata(complete_path, csum) File "/usr/lib64/python2.7/site-packages/sqlitecachec.py", line 61, in getOtherdata self.repoid)) TypeError: Can not create db_info table: database is locked
[bgstack] name=bgstack baseurl=file:///mnt/smash/Support/Platforms/Korora22/ gpgcheck=0
Steps I've already tried that did not help
rm -rf /var/lib/rpm/__db* rpm --rebuilddb
dnf clean all
My /etc/fstab includes this line:
//win-server1/smash /mnt/smash cifs rw,user,uid=bgstack,credentials=/root/.bgstack.example.com,exec,soft
Observe that it will mount my directory as the user bgstack, so I actually umounted and mounted with uid root (effectively, by leaving that part out):
mount -t cifs -o credentials=/root/.bgstack.example.com //win-server1/smash /mnt/smash
It still would not successfully complete a createrepo command.
What appeared to work but is not optimal
This works, but is very clunky.
Host all rpms locally and create the repository there. Then transfer the repo data to the cifs share.
# as root: createrepo does not like regular users mkdir -p ~/localrepo cp -pr /mnt/smash/Support/Platforms/Korora22/*rpm ~/localrepo createrepo ~/localrepo cp -pr ~/localrepo/repodata /mnt/smash/Support/Platforms/Korora22/