dtmateojr / dtmrepo

dtmrepo is a mrepo replacement
Other
12 stars 4 forks source link

dtmrepo on Centos syncing RHEL6 a RHEL7 #15

Open CidV1 opened 6 years ago

CidV1 commented 6 years ago

Hello, I want to mirror RHEL repos (more) to dtmrepo server located on Centos. Your instructions however say "If you wish to synchronise Red Hat packages, make sure that your dtmrepo server is registered and subscribed.". Is it still possible to use your tool?

dtmateojr commented 6 years ago

I don't think that is possible. It would be a serious breach of security of Red Hat's subscription service if anyone could just pull packages for free.

I would suggest that you convert your CentOS box into a RHEL box and then register it. Conversion is very easy as it only requires you to install the redhat-release rpm.

CidV1 commented 6 years ago

It is not for free, I have subscriptions for the mirrors. mrepo had gensystemid, which allowed to create and subscribe RH mirrors on a nonRH repo server.

dtmateojr commented 6 years ago

That's precisely why I created dtmrepo. 😊Mrepo doesn't work with RHSM. The security model of subscription-manager is different.

CidV1 commented 6 years ago

Ok, so I have the RHEL7 properly registered and subscribed. I have ran the installer.sh script. The script however did not prepare the bin/dtmrepo properly. It contains only

!/bin/bash

INSTALLDIR=/usr/local/dtmrepo

Shall I copy down the script from the page and replace this one?

CidV1 commented 6 years ago

Got it now. The installer required the dtmrepo script next to it..

dtmateojr commented 6 years ago

Just git clone the entire thing and then use the installer. Specify the target dir, repo dir and subscribe and it will automatically register your system with RH as well. For example:

installer.sh /usr/local/dtmrepo /var/dtmrepo subscribe

CidV1 commented 6 years ago

Thank you very much. I am now done testing and need to return the system to the pre-dtmrepo conf changes. How do I proceed? Is there a script, that returms everything to the old state?

CidV1 commented 6 years ago

Hello, the "dtmrepo -i" generate dfile /etc/yum.repos.d/redhat-dtmrepo.repo contains huge list of available repos. It says that is is automatically generated, however I only want updates, suplementary and optional repos, like in the old mrepo. How do I proceed?

CidV1 commented 6 years ago

Is it enable/disable repos via the yum-config-manager that it will change the /etc/yum.repos.d/redhat-dtmrepo.repo?

CidV1 commented 6 years ago

It looks like I need to reinstall, because I did not download all files for the initial setup. How do I clean everything and reinstall? Sorry for so many questions:) dtmrepo-master]# /usr/local/dtmrepo/bin/dtmrepo -augfv Missing [control] section in /usr/local/dtmrepo/etc/dtmrepo.conf.d/dtmrepo.conf. No repos defined for dtmrepo. Skipping... Missing [control] section in /usr/local/dtmrepo/etc/dtmrepo.conf.d/dtmrepo-yum.conf. No repos defined for dtmrepo-yum. Skipping... Missing [control] section in /usr/local/dtmrepo/etc/dtmrepo.conf.d/httpd-dtmrepo.conf. No repos defined for httpd-dtmrepo. Skipping... dtmrepo-master]# cat /usr/local/dtmrepo/etc/dtmrepo.conf.d/dtmrepo.conf cat: /usr/local/dtmrepo/etc/dtmrepo.conf.d/dtmrepo.conf: No such file or directory

dtmateojr commented 6 years ago

instructions.txt has a comprehensive howto

CidV1 commented 6 years ago

I almost know it by heart;-) Could you look why the clean reinstall did not populate the confdir? /usr/local/dtmrepo/etc/dtmrepo.conf.d/. It should contain the 3 above files, however it does not

dtmateojr commented 6 years ago

Do "rm -rf /usr/local/dtmrepo" then run the installer.sh again By default the dtmrepo.conf.d directory should be empty. dtmrepo.conf, dtmrepo-yum.conf and httpd-dtmrepo.conf are installed in different directories.