Change:
<del> Author: aszlig <aszlig@nix.build> Date:   Fri Oct 20 10:17:44 2017 +0000 Backport Linux 4.14 fixes against version 5.1.26 This combines the following upstream commits: * Additions/linux/drm: make vboxvideo work with Linux 4.14. bugref:8524: Additions/linux: play nicely with distribution-installed Additions Changes needed to build against Linux 4.14, applying them to older versions too where that will not hurt. Upstream changeset URL: https://www.virtualbox.org/changeset/69143/vbox * Additions/linux/drm: remove load_lut call-back removed in 4.14. bugref:8524: Additions/linux: play nicely with distribution-installed Additions The load_lut call-back has been optional since Linux 3.11, which is the oldest kernel that we support the drm driver on.  It was removed altogether for 4.14, so remove it from our source. Upstream changeset URL: https://www.virtualbox.org/changeset/69525/vbox * Linux/NetFlt: (bugref:9036) Drop UFO support to prevent compilation issues with Linux kernel 4.14 Upstream changeset URL: https://www.virtualbox.org/changeset/69539/vbox * VBoxPci-linux.c: use kernel_write instead of vfs_write as of Linux 4.14. bugref:9057: VBoxPci: vfs_write() no longer exported by Linux kernel As of Linux 4.14 vfs_write() is no longer exported for use by modules.  Other users have been converted to use kernel_write(), which is a wrapper around vfs_write() with some added boiler-plate calls to make it safe to use on kernel addresses too.  It seems to me like we should probably already have been using kernel_write(), but I prefer to leave that decision to someone who knows the code, so this change switches over for 4.14 and later. Fixes: ticketref:17267:comment:6 Upstream changeset URL: https://www.virtualbox.org/changeset/69744/vbox I've rebased these commits against revision 62611, because that revision seems to be around the time 5.1.26 was released and the upstream project unfortunately doesn't use tags. This patch contains only the hunks necessary for the Linux guest additions. diff --git a/src/VBox/Additions/linux/drm/vbox_drv.c b/src/VBox/Additions/linux/drm/vbox_drv.c index 16075a475f..00779a9c9c 100644 --- a/src/VBox/Additions/linux/drm/vbox_drv.c +++ b/src/VBox/Additions/linux/drm/vbox_drv.c @@ -248,7 +248,9 @@ static struct drm_driver driver = .master_set = vbox_master_set, .master_drop = vbox_master_drop, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) +# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) .set_busid = drm_pci_set_busid, +# endif #endif .fops = &vbox_fops, @@ -278,4 +280,4 @@ static int __init vbox_init(void) -#ifdef CONFIG_VGA_CONSOLE +#if defined(CONFIG_VGA_CONSOLE) || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) if (vgacon_text_force() && vbox_modeset == -1) return -EINVAL; #endif @@ -289,11 +291,11 @@ static int __init vbox_init(void) if (vc_cons[i].d && vc_cons[i].d->vc_mode == KD_GRAPHICS) return -EINVAL; -    return drm_pci_init(&driver, &vbox_pci_driver); +    return pci_register_driver(&vbox_pci_driver); } static void __exit vbox_exit(void) { -    drm_pci_exit(&driver, &vbox_pci_driver); +    pci_unregister_driver(&vbox_pci_driver); } module_init(vbox_init); diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c index b55860b237..c6cc2445a5 100644 --- a/src/VBox/Additions/linux/drm/vbox_fb.c +++ b/src/VBox/Additions/linux/drm/vbox_fb.c @@ -375,23 +375,8 @@ out: return ret; } -static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, -                   u16 blue, int regno) -{ - -} - -static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, -                   u16 *blue, int regno) -{ -    *red = regno; -    *green = regno; -    *blue = regno; -} static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { -    .gamma_set = vbox_fb_gamma_set, -    .gamma_get = vbox_fb_gamma_get, .fb_probe = vboxfb_create, }; diff --git a/src/VBox/Additions/linux/drm/vbox_mode.c b/src/VBox/Additions/linux/drm/vbox_mode.c index 00e95d6f8c..6e5c5e6d0c 100644 --- a/src/VBox/Additions/linux/drm/vbox_mode.c +++ b/src/VBox/Additions/linux/drm/vbox_mode.c @@ -145,11 +145,6 @@ static int vbox_set_view(struct drm_crtc *crtc) return 0; } -static void vbox_crtc_load_lut(struct drm_crtc *crtc) -{ - -} - static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode) { struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); @@ -298,10 +293,8 @@ static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = { .mode_set = vbox_crtc_mode_set, /* .mode_set_base = vbox_crtc_mode_set_base, */ .disable = vbox_crtc_disable, -    .load_lut = vbox_crtc_load_lut, .prepare = vbox_crtc_prepare, .commit = vbox_crtc_commit, - }; static void vbox_crtc_reset(struct drm_crtc *crtc) </del>

Discussion:
In a lot of cases, upstream sources or releases become unavailable (e.g. grsecurity) or even get modified (e.g. texlive) which breaks the package in older versions of nixpkgs. It would be nice to duplicate the sources via a torrent. This doesn't involve any trust, because the hash of the sources is known beforehand and would allow older nixpkgs to work as long as someone uses the desired package.
We've discussed a before but have mostly resisted because unless we build deep support for it into a persistent Nix daemon, as we could implement today would be a terrible "torrent citizen", and would never seed. Probably more promising is to build support for IPFS into Nix itself. See discussion at and Either way, I don't think most of the work would happen inside nixpkgs, so if you think the above issues don't cover what you want, I'd suggest posting more information on the Nix issue tracker rather than in here.
FWIW I had an experimental via but dropped it because of the same reasons -- it'd be an awful "torrent citizen".
Actually, the ipfs issue seems to be exactly what I wanted, so I'll close this issue.
can you share your please? I'm currently thinking about packaging the program where using aria2c for install is an official way to install
moved to PR <detailspkgs/build-