@@ -6965,23 +6965,13 @@ function addDnfRepo(use_ros2_testing) {
69656965 "--set-enabled" ,
69666966 extra_repo_name ,
69676967 ] ) ;
6968- // Install key and repo using ros-apt-source:
6969- // https://docs.ros.org/en/rolling/Installation/RHEL-Install-RPMs.html#enable-required-repositories
6970- const apt_version = yield utils . getRosAptSourceLatestVersion ( ) ;
6968+ const testing_repo_suffix = use_ros2_testing ? "-testing" : "" ;
69716969 yield utils . exec ( "sudo" , [
6972- "dnf" ,
6973- "install" ,
6974- `https://github.com/${ utils . ROS_APT_SOURCE_REPO } /releases/download/${ apt_version } /ros2-release-${ apt_version } -1.noarch.rpm` ,
6970+ "curl" ,
6971+ "--output" ,
6972+ "/etc/yum.repos.d/ros2.repo" ,
6973+ `http://packages.ros.org/ros2${ testing_repo_suffix } /rhel/ros2${ testing_repo_suffix } .repo` ,
69756974 ] ) ;
6976- if ( use_ros2_testing ) {
6977- yield utils . exec ( "sudo" , [ "dnf" , "config-manager" , "--disable" , "ros2" ] ) ;
6978- yield utils . exec ( "sudo" , [
6979- "dnf" ,
6980- "config-manager" ,
6981- "--enable" ,
6982- "ros2-testing" ,
6983- ] ) ;
6984- }
69856975 yield utils . exec ( "sudo" , [ "dnf" , "makecache" , "--assumeyes" ] ) ;
69866976 } ) ;
69876977}
@@ -7069,13 +7059,68 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
70697059 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
70707060 } ) ;
70717061} ;
7062+ var __importDefault = ( this && this . __importDefault ) || function ( mod ) {
7063+ return ( mod && mod . __esModule ) ? mod : { "default" : mod } ;
7064+ } ;
70727065Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
70737066exports . runLinux = runLinux ;
70747067const core = __importStar ( __nccwpck_require__ ( 186 ) ) ;
70757068const io = __importStar ( __nccwpck_require__ ( 436 ) ) ;
70767069const apt = __importStar ( __nccwpck_require__ ( 671 ) ) ;
70777070const pip = __importStar ( __nccwpck_require__ ( 744 ) ) ;
70787071const utils = __importStar ( __nccwpck_require__ ( 314 ) ) ;
7072+ const path = __importStar ( __nccwpck_require__ ( 17 ) ) ;
7073+ const fs_1 = __importDefault ( __nccwpck_require__ ( 147 ) ) ;
7074+ // Open Robotics APT Repository public GPG key, as retrieved at:
7075+ // https://github.com/ros/rosdistro/blob/master/ros.asc
7076+ //
7077+ // Unfortunately, usin apt-key adv is slow, and is failing sometimes, causing
7078+ // spurious pipelines failures. The action is hard-coding the key here to
7079+ // mitigate this issue.
7080+ const openRoboticsAptPublicGpgKey = `
7081+ -----BEGIN PGP PUBLIC KEY BLOCK-----
7082+ Version: GnuPG v1
7083+
7084+ mQINBFzvJpYBEADY8l1YvO7iYW5gUESyzsTGnMvVUmlV3XarBaJz9bGRmgPXh7jc
7085+ VFrQhE0L/HV7LOfoLI9H2GWYyHBqN5ERBlcA8XxG3ZvX7t9nAZPQT2Xxe3GT3tro
7086+ u5oCR+SyHN9xPnUwDuqUSvJ2eqMYb9B/Hph3OmtjG30jSNq9kOF5bBTk1hOTGPH4
7087+ K/AY0jzT6OpHfXU6ytlFsI47ZKsnTUhipGsKucQ1CXlyirndZ3V3k70YaooZ55rG
7088+ aIoAWlx2H0J7sAHmqS29N9jV9mo135d+d+TdLBXI0PXtiHzE9IPaX+ctdSUrPnp+
7089+ TwR99lxglpIG6hLuvOMAaxiqFBB/Jf3XJ8OBakfS6nHrWH2WqQxRbiITl0irkQoz
7090+ pwNEF2Bv0+Jvs1UFEdVGz5a8xexQHst/RmKrtHLct3iOCvBNqoAQRbvWvBhPjO/p
7091+ V5cYeUljZ5wpHyFkaEViClaVWqa6PIsyLqmyjsruPCWlURLsQoQxABcL8bwxX7UT
7092+ hM6CtH6tGlYZ85RIzRifIm2oudzV5l+8oRgFr9yVcwyOFT6JCioqkwldW52P1pk/
7093+ /SnuexC6LYqqDuHUs5NnokzzpfS6QaWfTY5P5tz4KHJfsjDIktly3mKVfY0fSPVV
7094+ ok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AmgSGgYFCRS0dnAACgkQ9C7W+6sX
7110+ xlS/UA//aAgP67DunDdak96+fLemWJkl4PHhj6637lzacJ+SlRzeUbnS/2XLhmk1
7111+ BNYoib3IHp3GBqvLsQqkCUZWaJTvkkAvJ+1W2N7JByt7Z/tnTS7aVfDxF53nYCxY
7112+ eSH921y2AtIZCIl1N3R2ic7pyzNkVVqwKIV1EqWLMa8GQTy4V0pgwaLE6Ce9Bmtv
7113+ 04upGyiPXRoPM3Rfc0mTUtPGJLf651img6TYGb1UbKs2aAitiI2ptg8EdiRYYcGo
7114+ nG8Ar3aUnYj+fpfhTyvqwx0MTtAPDiMUx2vELReYIvhwU+SRHWpp20nL0WIK2krK
7115+ qIq5SwIboBSLkQ5j7tjehKkqfxanUrlUxu/XYlEhq0Mh5oCfBrarIFBUBULUX86p
7116+ ZQUqW4+MrIxHcNcrCPGm3U/4dSZ1rTAdyeEUi7a2H96CYYofl7dq1xXGMDFh+b5/
7117+ 3Yw3t8US4VCwxmEj+C3ciARJauB1oDOilEieszPvIS3PdVpp6HCZRRHaB689AzMF
7118+ FoD40iowsNS9XmO6O8V7xzVVS0EtNhz9qUGIz8yjWeLLdpR8NqHOFOvrPP66voEV
7119+ Gc0Va/nozc05WWt42bc0hs1faRMqHRlAlJIKSUm4NSqc+YDNPYFlZSnB97tBhHC9
7120+ CEXRgHY3Utq/I3CLJ+KcJCUCH5D16Z7aOoazG9DKbewA+da8Drw=
7121+ =9IZg
7122+ -----END PGP PUBLIC KEY BLOCK-----
7123+ ` ;
70797124/**
70807125 * Configure basic OS stuff.
70817126 */
@@ -7115,36 +7160,43 @@ function configOs() {
71157160 yield apt . runAptGetInstall ( [ "tzdata" ] ) ;
71167161 } ) ;
71177162}
7163+ /**
7164+ * Add OSRF APT repository key.
7165+ *
7166+ * This is necessary even when building from source to install colcon, vcs, etc.
7167+ */
7168+ function addAptRepoKey ( ) {
7169+ return __awaiter ( this , void 0 , void 0 , function * ( ) {
7170+ const workspace = process . env . GITHUB_WORKSPACE ;
7171+ const keyFilePath = path . join ( workspace , "ros.key" ) ;
7172+ fs_1 . default . writeFileSync ( keyFilePath , openRoboticsAptPublicGpgKey ) ;
7173+ yield utils . exec ( "sudo" , [ "apt-key" , "add" , keyFilePath ] ) ;
7174+ } ) ;
7175+ }
71187176// Ubuntu distribution for ROS 1
71197177const ros1UbuntuVersion = "focal" ;
71207178/**
71217179 * Add OSRF APT repository.
71227180 *
71237181 * @param ubuntuCodename the Ubuntu version codename
7124- * @param use_ros2_testing whether to use the apt testing repository
71257182 */
71267183function addAptRepo ( ubuntuCodename , use_ros2_testing ) {
71277184 return __awaiter ( this , void 0 , void 0 , function * ( ) {
7128- // Install key and apt repo using ros-apt-source:
7129- // https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debs.html#enable-required-repositories
7130- const apt_version = yield utils . getRosAptSourceLatestVersion ( ) ;
7131- const deb_file = "/tmp/apt-source.deb" ;
7132- let deb_url = "" ;
71337185 // There is now no Ubuntu version overlap between ROS 1 and ROS 2
71347186 if ( ros1UbuntuVersion === ubuntuCodename ) {
7135- deb_url = `https://github.com/${ utils . ROS_APT_SOURCE_REPO } /releases/download/${ apt_version } /ros-apt-source_${ apt_version } .${ ubuntuCodename } _all.deb` ;
7187+ yield utils . exec ( "sudo" , [
7188+ "bash" ,
7189+ "-c" ,
7190+ `echo "deb http://packages.ros.org/ros/ubuntu ${ ubuntuCodename } main" > /etc/apt/sources.list.d/ros-latest.list` ,
7191+ ] ) ;
71367192 }
71377193 else {
7138- const testing = use_ros2_testing ? "-testing" : "" ;
7139- deb_url = `https://github.com/${ utils . ROS_APT_SOURCE_REPO } /releases/download/${ apt_version } /ros2${ testing } -apt-source_${ apt_version } .${ ubuntuCodename } _all.deb` ;
7194+ yield utils . exec ( "sudo" , [
7195+ "bash" ,
7196+ "-c" ,
7197+ `echo "deb http://packages.ros.org/ros2${ use_ros2_testing ? "-testing" : "" } /ubuntu ${ ubuntuCodename } main" > /etc/apt/sources.list.d/ros2-latest.list` ,
7198+ ] ) ;
71407199 }
7141- yield utils . exec ( "sudo" , [
7142- "bash" ,
7143- "-c" ,
7144- `curl -L -o ${ deb_file } "${ deb_url } "` ,
7145- ] ) ;
7146- yield utils . exec ( "sudo" , [ "bash" , "-c" , `apt install ${ deb_file } ` ] ) ;
7147- yield utils . exec ( "sudo" , [ "bash" , "-c" , `rm ${ deb_file } ` ] ) ;
71487200 yield utils . exec ( "sudo" , [ "apt-get" , "update" ] ) ;
71497201 } ) ;
71507202}
@@ -7174,6 +7226,7 @@ function runLinux() {
71747226 const use_ros2_testing = core . getInput ( "use-ros2-testing" ) === "true" ;
71757227 const installConnext = core . getInput ( "install-connext" ) === "true" ;
71767228 yield configOs ( ) ;
7229+ yield addAptRepoKey ( ) ;
71777230 const ubuntuCodename = yield utils . determineDistribCodename ( ) ;
71787231 yield addAptRepo ( ubuntuCodename , use_ros2_testing ) ;
71797232 if ( "noble" !== ubuntuCodename ) {
@@ -7477,15 +7530,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
74777530 } ) ;
74787531} ;
74797532Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
7480- exports . ROS_APT_SOURCE_REPO = void 0 ;
74817533exports . exec = exec ;
74827534exports . getRequiredRosDistributions = getRequiredRosDistributions ;
74837535exports . validateDistro = validateDistro ;
74847536exports . determineDistribCodename = determineDistribCodename ;
74857537exports . determineDistrib = determineDistrib ;
74867538exports . determineDistribVer = determineDistribVer ;
74877539exports . getArch = getArch ;
7488- exports . getRosAptSourceLatestVersion = getRosAptSourceLatestVersion ;
74897540const actions_exec = __importStar ( __nccwpck_require__ ( 514 ) ) ;
74907541const core = __importStar ( __nccwpck_require__ ( 186 ) ) ;
74917542/**
@@ -7597,25 +7648,6 @@ function getArch() {
75977648 return getCommandOutput ( "dpkg --print-architecture" ) ;
75987649 } ) ;
75997650}
7600- exports . ROS_APT_SOURCE_REPO = "ros-infrastructure/ros-apt-source" ;
7601- /**
7602- * Get the latest version of the ros-apt-source package.
7603- *
7604- * https://github.com/ros-infrastructure/ros-apt-source/releases
7605- *
7606- * @returns the latest version of the ros-apt-source packages
7607- */
7608- function getRosAptSourceLatestVersion ( ) {
7609- return __awaiter ( this , void 0 , void 0 , function * ( ) {
7610- // TODO(christophebedard): figure out why doesn't work and switch back
7611- // return getCommandOutput(
7612- // `curl -s https://api.github.com/repos/${ROS_APT_SOURCE_REPO}/releases/latest | grep -F "tag_name" | awk -F\\" '{print $4}'`,
7613- // );
7614- return new Promise ( ( resolve ) => {
7615- resolve ( "1.1.0" ) ;
7616- } ) ;
7617- } ) ;
7618- }
76197651
76207652
76217653/***/ } ) ,
0 commit comments