<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34000</bug_id>
          
          <creation_ts>2017-10-12 10:51:16 +0300</creation_ts>
          <short_desc>Не работают URLы с literal IPv6 адресами в sources.list</short_desc>
          <delta_ts>2025-04-24 10:32:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>apt</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Vissarionov">gremlin</reporter>
          <assigned_to name="Ivan Zakharyaschev">imz</assigned_to>
          <cc>arseny</cc>
    
    <cc>boyarsh</cc>
    
    <cc>darktemplaralt</cc>
    
    <cc>evg</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>rider</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166287</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Vissarionov">gremlin</who>
    <bug_when>2017-10-12 10:51:16 +0300</bug_when>
    <thetext># cat /etc/apt/sources.list.d/sisyphus-local.list
rpm [alt] http://[::1]/Sisyphus x86_64 classic
rpm [alt] http://[::1]/Sisyphus noarch classic

# apt-get update
Err http://[::1] x86_64 release
  400 Bad Request
Err http://[::1] noarch release
  400 Bad Request
Failed to fetch http://[::1]/Sisyphus/x86_64/base/release  400 Bad Request
Failed to fetch http://[::1]/Sisyphus/noarch/base/release  400 Bad Request

# tail -2 /var/log/nginx/access.log
[12/Oct/2017:10:43:27 +0300] ::1 - - &quot;GET /Sisyphus/x86_64/base/release HTTP/1.1&quot; (http:///Sisyphus/x86_64/base/release) 400 166 ref: &quot;-&quot; uag: &quot;-&quot; for: &quot;-&quot; &quot;acclang: -&quot;
[12/Oct/2017:10:43:27 +0300] ::1 - - &quot;GET /Sisyphus/noarch/base/release HTTP/1.1&quot; (http:///Sisyphus/noarch/base/release) 400 166 ref: &quot;-&quot; uag: &quot;-&quot; for: &quot;-&quot; &quot;acclang: -&quot;

# wget -q -O /dev/null &apos;http://[::1]/Sisyphus/noarch/base/release&apos;

# tail -1 /var/log/nginx/access.log
[12/Oct/2017:10:46:15 +0300] ::1 - - &quot;GET /Sisyphus/noarch/base/release HTTP/1.1&quot; (http://[::1]/Sisyphus/noarch/base/release) 200 691 ref: &quot;-&quot; uag: &quot;Wget/1.14 (linux-gnu)&quot; for: &quot;-&quot; &quot;acclang: -&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184082</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2019-09-03 08:55:34 +0300</bug_when>
    <thetext>Воспроизвёл. Лёша, посмотри пожалуйста.
При этом - если dns отдал IPV6 имя, то apt отлично с ним работает.
Опции из Debain Acquire::ForceIPv4=true и Acquire::ForceIPv6=true у нас тоже не работают, кстати.

Для тестирования можно использовать https://download.basealt.ru и его IPv4/IPv6 адреса.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184137</commentid>
    <comment_count>2</comment_count>
    <who name="Aleksei Nikiforov">darktemplaralt</who>
    <bug_when>2019-09-04 18:21:10 +0300</bug_when>
    <thetext>Удалось воспроизвести с адресом [::1]. С адресом [2a01:8600:200::11] не воспроизвелось у меня.

$ host download.basealt.space
download.basealt.space has address 176.12.98.77
download.basealt.space has IPv6 address 2a01:8600:200::11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184157</commentid>
    <comment_count>3</comment_count>
    <who name="Aleksei Nikiforov">darktemplaralt</who>
    <bug_when>2019-09-05 15:40:52 +0300</bug_when>
    <thetext>Сделал исправление, собрал задание #237148. Нужен аппрув.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257393</commentid>
    <comment_count>4</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2025-01-15 17:14:25 +0300</bug_when>
    <thetext>(In reply to Aleksei Nikiforov from comment #3)
&gt; Сделал исправление, собрал задание #237148. Нужен аппрув.

Нет больше такого задания.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263464</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-04-24 10:32:28 +0300</bug_when>
    <thetext>apt-0.5.15lorg2-alt92 -&gt; sisyphus:

 Wed Apr 16 2025 Ivan Zakharyaschev &lt;imz@altlinux&gt; 0.5.15lorg2-alt92
 - Support encoded usernames and passwords in URIs (incl. http_proxy); it was
   impossible to have @ there; now one should write %40 (ALT#38277).
 - Get config values with percent (%) correct in methods (e.g., a password as
   above in Acquire::http::Proxy). More generally: for correct decoding,
   do always encode percent (%) when %-encoding strings (in any URIs etc).
 - Backported the fixes from Debian 0.9.8~3 (IPv6 literals; encode passwords):
   + properly escape IP-literals (e.g. IPv6 address) in HTTP requests
     (allows using IPv6 numeric addresses in sources.list) (ALT#34000);
   + %-encode username and password when writing URIs (doesn&apos;t help alone with
     reading URIs as in the case of http_proxy above, but normalizes output);
   + include port in shortened URIs (e.g. with apt-cache policy).
 - testcases: Multiplied http-related ones to test these kinds of connections.
 - Some HTTP tweaks from Debian:
   + quote spaces ( ) and plus (+) in filenames (0.9.8~48);
   + do not send keep-alive (HTTP/1.1 default) (0.9.9.3~4^2).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>