lzap / fedora-docs / quick-docs

Forked from fedora-docs/quick-docs 4 years ago
Clone

fcdc846 Update dnf-system-upgrade for yum.repos.d 3rd party software

Authored and Committed by lzap 4 years ago
    Update dnf-system-upgrade for yum.repos.d 3rd party software
    
    This is now the second time when rpmconf reverted me google-chrome-stable.repo file back to version where I have `enabled=0`. It looks like this package generates the repo file in the post scriplet and does not mention it in the list of installed files, this probably tricks rpmconf to do an incorrect action. I would love to investigate further and maybe file a bug for chrome/chromium, but now that I finished my upgrade I can't look back why rpmconf thought this file needs updating - scriplet looks like this:

    

    ```

    YUM_REPO_FILE="/etc/yum.repos.d/google-chrome.repo"

    ZYPPER_REPO_FILE="/etc/zypp/repos.d/google-chrome.repo"

    URPMI_REPO_FILE="/etc/urpmi/urpmi.cfg"

    

    install_yum() {

      install_rpm_key

    

      if [ ! "$REPOCONFIG" ]; then

        return 0

      fi

    

      if [ -d "/etc/yum.repos.d" ]; then

    cat > "$YUM_REPO_FILE" << REPOCONTENT

    [google-chrome]

    name=google-chrome

    baseurl=$REPOCONFIG/$DEFAULT_ARCH

    enabled=1

    gpgcheck=1

    gpgkey=https://dl.google.com/linux/linux_signing_key.pub

    REPOCONTENT

      fi

    }

    ```

    

    It was likely some older version of the package. Anyway, I thought I'd drop a warning note for others, because I accidentally disabled this repo which left my Chrome on an old version for about a year until it websites started warning me about an unsupported version. This is dangerous, my main browser is Firefox but this could be a security problem for others.